#include "util.hpp"
int main()
{
	std::string str=R"({"username":"zhangxule","password":"123456"})";
	Json::Value val;
	im_sys::JsonUtil::UnSerialize(str,&val);
	std::cout<<val["username"].asString()<<std::endl;
	std::cout<<val["password"].asString()<<std::endl;

	Json::Value err;
	err["result"]=false;
	err["reason"]="用户名已被占用！";
	std::string buf;
	im_sys::JsonUtil::Serialize(err,&buf);
	std::cout<<buf<<std::endl;
	return 0;
}
